<template>
    <div class="layui-input-<%= viewType %>">
        <textarea name="<%= name %>" id="<%= 'input-' + inputType +'-'+ name %>" 
            <% if ( verify ) { %> lay-verify="<%= verify %>" <% } %> placeholder="<%= placeholder %>" 
            autocomplete="off"
            class="layui-textarea"></textarea>
    </div>
</template>
<script name="compile">
    function templateCompile(data) {
        var defaultData = {
            type: "module",
            placeholder: "请输入",
            inputType: "text",
            verify: false,
            viewType:"inline",
            comparedList: false,
        };
        var newData = Object.assign(defaultData, data);
        var callback = {
            success: true,
            result: newData
        };
        if (!newData.name) {
            return {
                success: false,
                result: "请输入参数名称，参数名：name"
            };
        }
        return callback;
    }
</script>